//
// Created by 罗俊华 on 2022/1/21.
//

#include "my_queue.h"
#include <iostream>

void enqueue_and_dequeue(int enqueueSize,int dequeueSize, Queue *queue);

using std::cout;
using std::endl;

int main() {

    int size = 10;

    Queue *queue = new Queue(size);

    enqueue_and_dequeue(10,0, queue);
    enqueue_and_dequeue(2,15, queue);
    enqueue_and_dequeue(2,2, queue);

//    赋值运算符重载成员函数已被私有化，禁止赋值
//    Queue q = *queue;

//      拷贝构造函数已被私有化，禁止拷贝
//    Queue * qq = new Queue(*queue);

    delete queue;

}

/**
 * 入队和出队
 * @param size
 * @param queue
 */
void enqueue_and_dequeue(int enqueueSize,int dequeueSize, Queue *queue) {
    for (int i = 0; i < enqueueSize; ++i) {
        queue->enqueue(i);
    }

    for (int i = 0; i < dequeueSize; ++i) {
        int result = queue->dequeue();
        cout << result << endl;
    }
}
